//
//  MYNewsParentingListVC.m
//  MuYing
//
//  Created by tbb on 2019/8/2.
//  Copyright © 2019 TBB. All rights reserved.
//

#import "MYNewsParentingListVC.h"
#import "MYNewsParentingListCell.h"
#import "MYNewsDetailsScenicspotVC.h"
@interface MYNewsParentingListVC ()

@end

@implementation MYNewsParentingListVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

-(void)setupView {
    [super setupView];
    self.listTableView.bounces = NO;
    self.listTableView.backgroundColor = HexColor(0xFAFAFA);
    self.listTableView.frame = CGRectMake(0, 0, kScreenWidth, (2*kNEWS_PARENTING_LIST_H) + 73);
    self.listTableView.scrollEnabled = NO;
    [self.listTableView registerClass:[MYNewsParentingListCell class] forCellReuseIdentifier:@"MYNewsParentingListCell"];

}

#pragma mark - JXCategoryListContentViewDelegate

- (UIView *)listView {
    return self.view;
}

- (UIScrollView *)listScrollView {
    return self.listTableView;
}
#pragma mark - JXCategoryListContentViewDelegate end

#pragma mark - UITableViewDelegate, UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 2;
}

- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 1;
}
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
    MYNewsParentingListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MYNewsParentingListCell"];
//    if (!cell){
//        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"kTableViewCell"];
//    }
//    cell.contentView.backgroundColor = UIColor.whiteColor;
//    [tableView qmui_clearsSelection];
    cell.navVC = self.navVC;
    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return (kNEWS_PARENTING_LIST_H + 36);
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

}

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    if (section == 0) {
        return 1;
    }
    return 0.001;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.001;
}
#pragma mark - UITableViewDelegate, UITableViewDataSource end
@end
